home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / PRN2FIL3.ARJ / PRN2FILE.DOC < prev   
Text File  |  1992-02-11  |  6KB  |  113 lines

  1. PRN2FILE 
  2. Command 
  3.  
  4. Tom Kihlken     1987/No. 22 (Utilities) 
  5. ****************************************************************************** 
  6. ** Modified Feb 11, 1992, by John Durso.  Note, I added the
  7. following Modifications made by Mel Brown to the original PRN2FILE
  8. (1987 version 1.0) program in 1989 to the new PRN2FILE (1991
  9. version 1.1)
  10.  
  11. * Modified May, 1989, by Mel Brown.  See the Addendum on page 2 of this *
  12. document.  Added a sound as a reminder to the user that printer traffic is *
  13. being redirected to a disk file by this program.  Also corrected several   *
  14. logic errors in the original version of the program.  Many thanks to   *
  15. Christopher L. Morgan, author of "Bluebook Of Assembly Routines For The IBM   *
  16. PC & XT", for the sound routines used in this program.
  17. ****************************************************************************** 
  18.  
  19. Purpose:  Captures any output nominally directed to a printer to a file 
  20.           that can then be edited by a word processor or printed later. 
  21.  
  22. Format:   PRN2FILE [d:][path]filename [/Pn] [/Bn] [/U] 
  23.  
  24. Remarks: 
  25.  
  26.      PRN2FILE is a memory resident program that is normally loaded as part 
  27. of your AUTOEXEC.BAT file.  It should be installed before other print 
  28. utilities, such as a print spooler or the DOS MODE command.  Once installed, 
  29. the program may be run multiple times to change the filename (the drive and 
  30. path default to the current directory unless specified) designated to receive 
  31. the printer output. 
  32.  
  33.      Unless the filename is changed, successive print operations are 
  34. appended to (rather than overwrite) the created file.  To disable the printer 
  35. output redirection, simply omit to specify a filename. 
  36.  
  37.      The optional /Pn parameter designates the printer number (the default 
  38. is LPT1) to be redirected.  Note that output to a non-existent printer (/P2 
  39. in a one-printer system) is supported.  This is another way to permit normal 
  40. printing while PRN2FILE remains resident.  Legal values for Pn range from 1 
  41. through 3. 
  42.  
  43.      The optional /Bn parameter sets the buffer size.  The default value is 
  44. 4096 bytes, and values up to 64K may be specified.  The buffer repeatedly 
  45. empties when partially full in order to minimize the chance of buffer 
  46. overflow even when DOS may be called on for other activities than writing the 
  47. buffer to disk.  Should buffer overflow occur an error message is produced, 
  48. but some data will be lost, so the file should be re-written using a larger 
  49. buffer. 
  50.  
  51.      The optional /U parameter is used to unload PRN2FILE from memory.  If 
  52. other memory-resident utilities have been loaded after PRN2FILE and have 
  53. chained onto the same interrupts, it will not be possible to unload the  
  54. program, and a message to this effect will be displayed. 
  55.  
  56.      All optional parameters may be entered in any order, but must each be 
  57. separated by a single space character that acts as a delimiter. 
  58.  
  59. PRN2FILE                           Page 2
  60. ****************************************************************************** 
  61.                                    ADDENDUM 
  62.      Modifications to PRN2FILE by Mel Brown, May, 1989. 
  63.  
  64.      I use PRN2FILE frequently, and have shared it with many others.  It's easy
  65. to forget that this ever-so-useful routine is running in the  background. 
  66. Occasionally, this leads to some confusion when I want to send a file to the
  67. 'real' printer.  So, I have modified the original version of PRN2FILE to sound
  68. a reminder that it is in use.  When PRN2FILE receives printer data, and five or
  69. more seconds have elapsed since the last data was received, it will produce a
  70. short double beep sound.   
  71.  
  72.      With this modification, the next time you crank up your word processor
  73. with PRN2FILE active, you won't be puzzled as to why your printer won't work.
  74. PRN2FILE will now remind you with a short sound that it is gobbling up your
  75. printer output and redirecting it to a disk file.   
  76.  
  77.      You can modify the sound characteristics either in the .ASM file, or
  78. directly in the .COM file.  In the .ASM file, look for these labels: 
  79.      FREQ1     (pitch of first sound, preset to 0400 Hz) 
  80.      FREQ2     (pitch of second sound, preset to 1300 Hz) 
  81.      LGTH1     (duration of first sound, preset to 40 milliseconds) 
  82.      LGTH2     (duration of delay between sounds, preset to 40 milliseconds) 
  83.      LGTH3     (duration of second sound, preset to 90 milliseconds) 
  84.  
  85. Modify any of those decimal values to suit your taste, then use the following
  86. procedure to create the modified .COM file: 
  87.      masm prn2file; 
  88.      link prn2file; 
  89.      exe2bin prn2file prn2file.com 
  90.      del prn2file.exe 
  91.      del prn2file.obj 
  92.  
  93.  
  94. CAUTION!  Unless you are fluent with the hexadecimal numbering
  95.           system, and are totally comfortable with DEBUG, don't
  96.           attempt the following procedure, especially on your only
  97.           copy of PRN2FILE.  Experiment on a work copy only. 
  98.  
  99.      In order to modify the .COM file directly, enter 'DEBUG PRN2FILE.COM'.  To
  100. examine the data elements in the order listed above, enter 'D 200 209'.  You
  101. will see ten bytes (five words) of data.  They are shown in hexadecimal, and
  102. the two bytes of each word are reversed left to right.  You must keep that in
  103. mind if you want to modify the numbers to produce a different sound.  Once you
  104. decide on the new values, use the DEBUG command 'E 20x hh hh' to change the
  105. data, where 'x' is the appropriate address, and 'hh hh' is the hexadecimal data
  106. you want to enter.  When finished, enter 'W', then 'Q' to write the updated
  107. file and quit to DOS.  Finally, deinstall PRN2FILE and reinstall it to effect
  108. your changes.   
  109.  
  110.      To test your modifications, just 'print' a short file.  You will hear the
  111. new sound immediately.  To test it again, wait at least five seconds, then
  112. 'print' the file again.   
  113.